﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Markup;
using UIT.Controls.Containers;

namespace UIT.Controls
{
    [ContentProperty("Child")]
    public class Border : DrawableControl, IContainer
    {
        public Border()
        {
            children = new SingleControlCollection(this);
        }

        public Style.Brush BorderBrush { get; set; }
        public Style.Thickness BorderThickness { get; set; }

        private SingleControlCollection children;

        public IControl Child
        {
            get { return children.Child; }
            set
            {
                children.Add(value);
                OnPropertyChanged("Child");
            }
        }


        public override bool IsContainer
        {
            get { return true; }
        }

        public override ControlType Type
        {
            get { return ControlType.Border; }
        }

        #region IContainer<IContainer,IControl> Members

        public IDisposableObservableCollection<IContainer, IControl> Children
        {
            get { return children; }
        }

        #endregion
    }
}
